home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
djgpp
/
include
/
qdirent.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-11
|
2KB
|
77 lines
/* Converted to qdirent.h for R5tkt by DMD - 4/22/94 */
#ifndef __DIRENT_H__
#define __DIRENT_H__
#ifdef __GO32__
#include <dirent.h>
#include <dir.h>
#define find_t ffblk
#define _dos_findfirst(a,b,c) findfirst(a,c,b)
#define _dos_findnext(a) findnext(a)
#define _dos_getfileattr(a,b) getfileattr(a,b)
#endif
#include <dos.h>
#define MAXNAMLEN 12 /* maximum filename length */
struct qdirent {
short d_attr;
#define d_attrib d_attr
short d_namlen;
char d_name[MAXNAMLEN + 1];
};
typedef struct _DIR /* Tagged. POHC 90/10/09 */
{
unsigned short dd_nentry; /* current entry in directory */
unsigned short dd_valid; /* whether entry is valid */
struct find_t dd_find_t; /* directory entry */
struct qdirent dd_dirent; /* alternative directory entry */
} qDIR; /* stream data from opendir() */
extern qDIR *qopendir(char *dirname);
extern struct qdirent *qreaddir(qDIR *dp);
extern int qclosedir(qDIR *dp);
#ifndef NO_PROTO
#ifdef __cplusplus /* for C++ V2.0 */
extern "C" { /* do not leave open across includes */
#endif /* __cplusplus */
typedef int (*_Sortfunc) (
#if NeedFunctionPtrPrototypes
const void *,
const void *
#endif
);
typedef int (*_Selectfunc) (
#if NeedFunctionPtrPrototypes
struct qdirent *
#endif
);
int scandir(const char *, struct qdirent ***, _Selectfunc *, _Sortfunc *);
int alphasort(const void *, const void *);
#ifdef __cplusplus /* for C++ V2.0 */
}
#endif /* __cplusplus */
#else /* NO_PROTO */
int scandir();
int alphasort();
#endif /* NO_PROTO */
#endif /* __DIRENT_H_ */